package com.aneliya.command.loginDialog;

import com.aneliya.framework.mvc.Facade;
import com.aneliya.framework.mvc.controller.ICommand;
import com.aneliya.framework.mvc.controller.MVCEvent;
import com.aneliya.model.User;
import com.aneliya.proxy.UserProxy;

public class LoginUserCommand implements ICommand {

	public void execute(MVCEvent event) {
		try {
			UserProxy userProxy = (UserProxy) Facade.getInstance().retrieveProxy("UserProxy");
			userProxy.login((User) event.data);
		} catch (InstantiationException ex) {
			ex.printStackTrace();
		} catch (IllegalAccessException ex) {
			ex.printStackTrace();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

}
